<?= $this->Html->script('ckeditor/ckeditor') ?>
<?= $this->Html->script('ckfinder/ckfinder') ?>

<p><?= $this->Html->link('&laquo; nazad', '/admin_pages/index/' . $data['Page']['category_id'], array(
    'escape' => false
)) ?></p>

<h1><? if (empty($data['Page']['id'])): ?>
    Nova stranica
<? else: ?>
    Izmena stranice
<? endif ?></h1>

<?= $this->Form->create('Page', array('url'=>'/admin_pages/save')) ?>

    <?= $this->Form->hidden('id', array('value' => @$data['Page']['id'])) ?>
    <?= $this->Form->hidden('category_id', array('value' => @$data['Page']['category_id'])) ?>
    
    <p><?= $this->Form->label('title', 'Naslov:', array('class'=>'auto')) ?>
    <?= $this->Form->text('title', array('value' => @$data['Page']['title'], 'required'=>false)) ?></p>
    
    <br clear="all">
    <?= $this->Form->textarea('content', array('value' => @$data['Page']['content'], 'class'=>'ckedit')) ?>

<?= $this->Form->submit('Sačuvaj') ?>
<?= $this->Form->end() ?>
